import os

from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    PROJECT_NAME: str = "collection"

    LOG_DIR: str | None = None
    LOG_ROTATION: str | None = None

    MYSQL_HOST: str
    MYSQL_USER: str
    MYSQL_PASSWORD: str
    MYSQL_PORT: int
    MYSQL_DB: str
    MYSQL_CHARSET: str = "utf8mb4"

    THREAD_MAX_WORKERS: int

    BASE_URL: str
    API_KEY: str

    model_config = SettingsConfigDict(env_file=os.path.normpath(os.path.join(os.path.dirname(__file__), "../.env")))


settings = Settings()
